<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 新 Bootstrap4 核心 CSS 文件 -->
    <link rel="stylesheet" href="__STATIC__/css/bootstrap.css">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="__STATIC__/js/jquery-2.1.4.min.js"></script>
    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
    <script src="__STATIC__/js/bootstrap.js"></script>
</head>
<body>
    <div class="container jumbotron center" style="max-width:540px;margin-top: 130px">
        <h2 align="center">欢迎进入内部管理系统</h2>
        <form action="{:url('Login/doLogin')}" method="post">
      
            <div class="form-group">
                <label for="usr">用户名:</label>
                <input type="text" class="form-control" id="usr" name="name" width="100px">
            </div>
            <div class="form-group">
                <label for="pwd">密码:</label>
                <input type="password" class="form-control" name="pwd" id="pwd">
            </div>
            <input type="submit" class="btn btn-info" id="login" value="登录">
            <input type="reset" class="btn btn-info" value="重置">
        </form>
    </div>
</body>
</html>
<script src="__STATIC__/jquery-3.3.1.min.js"></script>
<script>
     $("#login").click(function(){
        var name = $(this).attr('name');
        var pwd = $(this).attr('pwd');

        $.ajax({
            url:"{:url('Login/login')}",
            type:"post",
            data:{name:name,pwd:pwd},
            dataType:"json",
            success:function()
            {
                if('code'==1)
                {
                    alert("登录成功");
                }
            }
        })

    })
</script>